#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>

struct libo* HeSheng(struct libo* ph1, struct libo* ph2)
{
	if (ph1 == NULL)
	{
		return ph2;
	}
	if (ph1 == NULL)
	{
		return ph2;
	}
	struct libo* NH, NT;
	struct libo* ps = (struct libo*)malloc(sizeof(struct libo));
	if (ps == NULL)
	{
		perror("malloc");
		exit(1);
	}
	NH = NT = ps;
	while (p1 && p2)
	{
		if (p1->int > p2->int)
		{
			PushBack(NH, p2);
			NH = p2;
			p2 = p2->next;
		}
		else
		{
			PushBack(NH, p1);
			NH = p1;
			p1 = p1->next;
		}
	}
	while (p1)
	{
		PushBack(NH, p1);
		NH = p1;
		p1 = p1->next;
	}
	while (p2)
	{
		PushBack(NH, p2);
		NH = p2;
		p2 = p2->next;
	}
	return NT;
}